Its action attribute is bound to the action method saveChanges.
The method (shown below with comments omitted) simply saves any changes that have been made to movieDisplayGroup's objects to the database.
public void saveChanges() throws Exception {
try {
this.session().defaultEditingContext().saveChanges();
}
catch (Exception exception) {
System.err.println("Cannot save changes ");
throw exception;
}
this.session().defaultEditingContext().saveChanges();
sends a saveChanges message to the Session's defaultEditingContext. This default EOEditingContext object manages graphs of objects fetched from the database, and all changes to the database are saved through it. For more information, see the EOEditingContext class specification in the Enterprise Objects Framework Reference.An EOEditingContext's saveChanges method uses other Enterprise Objects Framework objects to analyze its network of enterprise objects (Movie objects referenced by the application) for changes and then to perform a set of corresponding operations in the database. If an error occurs during this process, saveChanges throws an exception. The Main.java saveChanges method simply raises the exception, having the effect of returning a diagnostic page. You could return an error page that explains the reason for the save failure instead, but the application in this tutorial uses the default behavior.
They are bound to the movieDisplayGroup.insert and movieDisplayGroup.delete methods respectively. The WODisplayGroup insert method creates a new enterprise object, then inserts it into the display group's list of objects just past the current selection. The WODisplayGroup delete method deletes the display group's selected object. These changes happen only in memory--not in the database. To actually insert a new row in the database (or delete a row), the user must click the "Save to database" button, invoking saveChanges on the session's EOEditingContext. The editing context analyzes the enterprise objects in memory; determines if any objects have been added, updated, or deleted; and then executes database operations to sync the database with the application.